﻿using System;
using TagLib;

namespace Voize
{
    internal class CTagger:ITagger
    {



        internal void SetBasicTags(string artist, string song, string file)
        {
            string[] ArtistArray = new string[1];
            ArtistArray[0] = artist;

            TagLib.File tagger = TagLib.File.Create(file);
            tagger.Tag.Title = song;
            tagger.Tag.AlbumArtists = ArtistArray;

            tagger.Save();
        }



        public string GetFirstArtist(string file)
        {
            string FirstArtist;

            TagLib.File TagReader = TagLib.File.Create(file);
            FirstArtist = TagReader.Tag.FirstAlbumArtist;

            return FirstArtist;
        }



        public string GetSong(string file)
        {
            string title;

            TagLib.File TagReader = TagLib.File.Create(file);
            title = TagReader.Tag.Title;

            return title;
        }



    }
}
